PowerTCP Mail for .NET
Write(Byte[],Int32,Int32) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > TcpStream Class > Write Method : Write(Byte[],Int32,Int32) Method




buffer
The storage location of the data to be sent.
offset
The zero-based position in the buffer from which to begin writing from.
size
The exact number of bytes to write.
Writes a sequence of bytes to the stream and returns when the operation is complete.

Syntax

Visual Basic (Declaration) 
Public Overloads Overrides Sub Write( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal size As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As TcpStream
Dim buffer() As Byte
Dim offset As Integer
Dim size As Integer
 
instance.Write(buffer, offset, size)
C# 
public override void Write( 
   byte[] buffer,
   int offset,
   int size
)
Managed Extensions for C++ 
public: void Write( 
   byte[]* buffer,
   int offset,
   int size
) override 
C++/CLI 
public:
void Write( 
   array<byte>^ buffer,
   int offset,
   int size
) override 

Parameters

buffer
The storage location of the data to be sent.
offset
The zero-based position in the buffer from which to begin writing from.
size
The exact number of bytes to write.

Exceptions

ExceptionDescription
System.IO.IOExceptionThrown when the stream is not Writeable.
System.ArgumentNullException.#ctorThrown when buffer is null.
System.ArgumentOutOfRangeException.#ctorThrown when the offset is less than zero or when size is less than or equal to zero.
System.ArgumentException.#ctorThrown when the (offset + size) > buffer.Length.

Remarks

Use the CanWrite property to determine whether the current instance supports writing.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.